define(
		[ "PDUtilDir/util", "PDUtilDir/tool", "PDUtilDir/slidebar" ],
		function(Util, Tool, Slidebar, inputSelect, MFU) {
			function detailSupportInit($scope, $compile) {
				return new detailSupport($scope, $compile);
			}
			function detailSupport($scope, $compile) {
				this.$scope = $scope;
				this.$compile = $compile;
			}
			detailSupport.fn = detailSupport.prototype;
			detailSupport.fn.digest = function() {
				this.$scope.$digest();
			};
			detailSupport.fn.init = function(id) {
                var _this = this,
					allData = this.$scope.grid.getAllData();
                this.entity = {};
                $.each(allData, function(index, row) {
                    if(row.id == id){
                        _this.entity = row;
                        return;
                    }
                });
			};
			detailSupport.fn.run = function(id) {
				var _this = this;
				_this.init(id);
				this.slidebars = Slidebar({
					size : 'lg',
					url : getServer() + "/static/app/system/log/views/detail.html",
//					close : true,
					$scope : this.$scope,
					$compile : this.$compile,
					afterLoad : function($Panel) {
						_this.initialization();
					}
				});
			};
			detailSupport.fn.initialization = function() { };
			return detailSupportInit;
		});